package api

import (
	"cart1/api/handler"
	"cart1/api/middleware"
	"cart1/pkg/jwt"
	"github.com/gin-gonic/gin"
)

func LoadRouter(r *gin.Engine) {
	r.Use(middleware.DemoM())
	user := r.Group("/user")
	{
		user.POST("login", handler.Login)
		user.Use(jwt.JWTAuth("2209A"))
		user.GET("chat", handler.Chat)
		user.GET("/getChatList", handler.GetChatList)
	}
}
